<template>
	<layout>
		<view class="content">
			<img class="logo"
				:src="detail.images" />
			<uni-card>
				<view>
					<p><strong><span style="font-family: 微软雅黑;font-size: 14px">活动开始时间：</span></strong></p>
					<p><span style="font-family: 微软雅黑; font-size: 14px; text-align: left;">{{detail.activeTime}}</span>
					</p>

					<p><strong><span style="font-family: 微软雅黑;font-size: 14px">活动结束时间：</span></strong></p>
					<p><span style="font-family: 微软雅黑; font-size: 14px; text-align: left;">{{detail.deleteTime}}</span>
					</p>


					<p><strong><span style="font-family: 微软雅黑;font-size: 14px"><span
									style="font-family:微软雅黑">奖品设置：</span></span></strong></p>
					<p><span style=";font-family:微软雅黑;font-size:14px"><span
								style="font-family:微软雅黑">一等奖：</span>{{detail.firstPeople}} 人</span></p>
					<p><span style=";font-family:微软雅黑;font-size:14px"><span style="font-family:微软雅黑">二等奖：</span>
							{{detail.secondPeople}}人</span></p>
					<p><span style=";font-family:微软雅黑;font-size:14px"><span style="font-family:微软雅黑">三等奖：</span> {{detail.secondPeople}} </span></p>
					<p><span style=";font-family:微软雅黑;font-size:14px"><span
								style="font-family:微软雅黑">参与奖：</span>{{detail.participationPeople}} 人</span></p>
								
				<view class="u-content">
					<p><strong><span style="font-family: 微软雅黑;font-size: 14px">特别说明：</span></strong></p>
						<u-parse :content="detail.descs"></u-parse>
					</view>
					<p class="ql-align-center"><span style="color: #000000;">本活动最终解释权归XXXXXXXXXX所有</span></p>
					
					<p><br></p>
				</view>
				<u-button text="查看排名情况" color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
					@tap="hello()">
				</u-button>
			</uni-card>
			<view class="foot">
				<div class="technical-support bg"><span><span>XXX</span> 提供技术支持 </span></div>
			</view>
		</view>

	</layout>
</template>

<script>

	import uniCard from '@/components/uni-card/uni-card.vue'
	import layout from '@/components/layout/index.vue'

	export default {
		data() {
			return {
				title: "\"XXX\"团体摄影大赛",
				id:0,
				detail:{}
			}
		},
		onLoad(params) {
				this.id = params.id
				this.init()
				
		},
		components: {
			uniCard,
			layout
		},
		methods: {
			init()
			{
				uni.$u.http.get('/app/activity/detail/'+this.id).then(res => {
					this.detail = res.data
						// if (res.data.list.length > 0) {
						// 	this.maxpage = res.data.totalPage
						// 	this.activityList = [...this.activityList, ...res.data.list];
						// }
						console.log(res);
						// if(res.code==0)
						// {
						// 	res.data.forEach(item=>{
						// 		this.ranks.push({
						// 			score:item.score,
						// 			value:JSON.parse(item.value)
						// 		})
						// 	})
						// }
					}
				)
			},
			hello()
			{
				uni.navigateTo({
					url:'/pages/user/activity/rankingList/index?id='+this.id
				})
			}

		}
	}
</script>

<style scoped lang="scss">
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		.logo {
			width: 100%;
			min-height: 100rpx;
		}

		.uni-card {
			width: 95%;
			border-radius: 5px;
			color: #333;
			font-size: .37333rem;
			text-align: justify;
			white-space: pre-wrap;
			line-height: 1.6;
		}

		.foot {
			color: #fff;
			margin: 20rpx 0;
		}
	}
</style>
